\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{\section{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding Interface Reference}
\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}\index{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding@{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding}}
}


The Binding form for the Injection system.  


Inheritance diagram for strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ae88e872043b9c0c8e6932d6457f8c5e7}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ae88e872043b9c0c8e6932d6457f8c5e7}{To\-Singleton} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ae88e872043b9c0c8e6932d6457f8c5e7}

\begin{DoxyCompactList}\small\item\em Map the Binding to a Singleton so that every {\ttfamily Get\-Instance()} on the Binder Key returns the same imstance. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7e7eee027ed73a36c38f18b865bbe4c6}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7e7eee027ed73a36c38f18b865bbe4c6}{To\-Value} (object o)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7e7eee027ed73a36c38f18b865bbe4c6}

\begin{DoxyCompactList}\small\item\em Map the Binding to a stated instance so that every {\ttfamily Get\-Instance()} on the Binder Key returns the provided imstance. Sets type to Value. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aaf4603dc2e97ccc6dbfefbf20cc77de4}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aaf4603dc2e97ccc6dbfefbf20cc77de4}{Set\-Value} (object o)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aaf4603dc2e97ccc6dbfefbf20cc77de4}

\begin{DoxyCompactList}\small\item\em Map the Binding to a stated instance so that every {\ttfamily Get\-Instance()} on the Binder Key returns the provided imstance. Does not set type. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a9ef8ddab4816a595f4e6db7e66be7d03}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a9ef8ddab4816a595f4e6db7e66be7d03}{Cross\-Context} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a9ef8ddab4816a595f4e6db7e66be7d03}

\begin{DoxyCompactList}\small\item\em Map the binding and give access to all contexts in hierarchy. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a372558a435574953af1cb6118306117d}{\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a372558a435574953af1cb6118306117d}{To\-Inject} (bool value)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a372558a435574953af1cb6118306117d}

\begin{DoxyCompactList}\small\item\em Boolean setter to optionally override injection. If false, the instance will not be injected after instantiation. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_acc3be9225936c2385ae3dccdcd4847df}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_acc3be9225936c2385ae3dccdcd4847df}{Bind$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_acc3be9225936c2385ae3dccdcd4847df}

\begin{DoxyCompactList}\small\item\em Bind is the same as Key, but permits Binder syntax\-: {\ttfamily Bind$<$T$>$().Bind$<$T$>$()} \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a15283f40aea160b30baa758ce6d48688}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a15283f40aea160b30baa758ce6d48688}{Bind} (object key)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a15283f40aea160b30baa758ce6d48688}

\begin{DoxyCompactList}\small\item\em Bind is the same as Key, but permits Binder syntax\-: {\ttfamily Bind$<$T$>$().Bind$<$T$>$()} \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a2a8f13fe155f789666ea077617b590e5}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a2a8f13fe155f789666ea077617b590e5}{To$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a2a8f13fe155f789666ea077617b590e5}

\begin{DoxyCompactList}\small\item\em Set the Binding's value to a Type. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aa2830a784e57d14faf352312906fd7e5}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aa2830a784e57d14faf352312906fd7e5}{To} (object o)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_aa2830a784e57d14faf352312906fd7e5}

\begin{DoxyCompactList}\small\item\em Set the Binding's value to a value, such as a string or class instance. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4763a32616ef321b606457b12685fcf4}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4763a32616ef321b606457b12685fcf4}{To\-Name$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4763a32616ef321b606457b12685fcf4}

\begin{DoxyCompactList}\small\item\em Qualify a binding using a marker type. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a019ab752b601346bd745792dca542383}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a019ab752b601346bd745792dca542383}{To\-Name} (object o)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a019ab752b601346bd745792dca542383}

\begin{DoxyCompactList}\small\item\em Qualify a binding using a value, such as a string or class instance. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7c80bd12ffe349ec4668159a0d2cffab}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7c80bd12ffe349ec4668159a0d2cffab}{Named$<$ T $>$} ()}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a7c80bd12ffe349ec4668159a0d2cffab}

\begin{DoxyCompactList}\small\item\em Retrieve a binding if the supplied name matches, by Type. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4a5941179f9bc3e3c05edf728367a8ff}{new \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding}{I\-Injection\-Binding} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4a5941179f9bc3e3c05edf728367a8ff}{Named} (object o)}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a4a5941179f9bc3e3c05edf728367a8ff}

\begin{DoxyCompactList}\small\item\em Retrieve a binding if the supplied name matches, by value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a964dae4babe47419ece25ce7df016401}{bool {\bfseries is\-Cross\-Context}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a964dae4babe47419ece25ce7df016401}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_accffa605c37073081890281cc14d1c12}{bool \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_accffa605c37073081890281cc14d1c12}{to\-Inject}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_accffa605c37073081890281cc14d1c12}

\begin{DoxyCompactList}\small\item\em Get the parameter that specifies whether this Binding allows an instance to be injected. \end{DoxyCompactList}\item 
\hyperlink{namespacestrange_1_1extensions_1_1injector_1_1api_aaf5414484d7eccb5c502984bd70549ae}{Injection\-Binding\-Type} \hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ab79532f96a6a17f831559143066fed78}{type}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em Get and set the Injection\-Binding\-Type. \end{DoxyCompactList}\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a01ff81e5c63698bd7e9614927dd05b8e}{new object {\bfseries key}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a01ff81e5c63698bd7e9614927dd05b8e}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ab66dc9cb77e7b5926a365f5e1baec1ae}{new object {\bfseries name}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ab66dc9cb77e7b5926a365f5e1baec1ae}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a80844fa673a551d4c2efc878e248620f}{new object {\bfseries value}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a80844fa673a551d4c2efc878e248620f}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a6f0003461d50b55cd513b86a4c2de1b1}{new Enum {\bfseries key\-Constraint}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a6f0003461d50b55cd513b86a4c2de1b1}

\item 
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a0799df8c8f2e3f35ca4d45b31becba03}{new Enum {\bfseries value\-Constraint}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_a0799df8c8f2e3f35ca4d45b31becba03}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The Binding form for the Injection system. 

The Injection\-Binding allows mapping to three core types\-: 
\begin{DoxyItemize}
\item Default\-: every {\ttfamily Get\-Instance()} on the Binder Key returns a new imstance 
\item To\-Singleton\-: every {\ttfamily Get\-Instance()} on the Binder Key returns the same imstance 
\item To\-Value\-: every {\ttfamily Get\-Instance()} on the Binder Key returns the provided imstance 
\end{DoxyItemize}

Named injections are supported, thus\-: \begin{DoxyVerb}Bind<IMyInterface>().To<MyInterfaceImplementer>().ToName(SomeEnum.VALUE);
\end{DoxyVerb}


returns a My\-Interface\-Implementer instance only to injections that specifically tag Some\-Enum.\-Value. This will be the same instance whenever it is called.

You can also map multiple Keys, allowing for polymorphic binding. This allows you to match two or more interfaces to a single class or value. \begin{DoxyVerb}Bind<IFirstInterface>().Bind<ISecondInterface>().To<PolymorphicClass>();
\end{DoxyVerb}


Note that while you can bind multiple keys to an Injection\-Binding, you can only bind one value. (The Injection system needs to know which concrete class you want created.)

\begin{DoxySeeAlso}{See Also}
\hyperlink{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binder}{strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binder} 
\end{DoxySeeAlso}


\subsection{Property Documentation}
\hypertarget{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ab79532f96a6a17f831559143066fed78}{\index{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binding@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binding}!type@{type}}
\index{type@{type}!strange::extensions::injector::api::IInjectionBinding@{strange\-::extensions\-::injector\-::api\-::\-I\-Injection\-Binding}}
\subsubsection[{type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Injection\-Binding\-Type} strange.\-extensions.\-injector.\-api.\-I\-Injection\-Binding.\-type\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}}\label{interfacestrange_1_1extensions_1_1injector_1_1api_1_1_i_injection_binding_ab79532f96a6a17f831559143066fed78}


Get and set the Injection\-Binding\-Type. 

\begin{DoxySeeAlso}{See Also}
\hyperlink{namespacestrange_1_1extensions_1_1injector_1_1api_aaf5414484d7eccb5c502984bd70549ae}{Injection\-Binding\-Type} 
\end{DoxySeeAlso}


The documentation for this interface was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Strange\-Io\-C/scripts/strange/extensions/injector/api/I\-Injection\-Binding.\-cs\end{DoxyCompactItemize}
